unit CadFormasPag;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, DB, StdCtrls, Mask, Buttons,
  SqlExpr, Provider, DBClient, DBLocal, DBLocalS, DMCaixa;

type
  TFrmCadFormasPag = class(TForm)
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    DBNavigator1: TDBNavigator;
    Label1: TLabel;
    DBEdit1: TDBEdit;
    Label2: TLabel;
    DBEdit2: TDBEdit;
    Label3: TLabel;
    Label4: TLabel;
    DBEdit4: TDBEdit;
    Label5: TLabel;
    DBEdit5: TDBEdit;
    Label6: TLabel;
    DBEdit6: TDBEdit;
    Label7: TLabel;
    DBEdit7: TDBEdit;
    Label8: TLabel;
    Label9: TLabel;
    DBEdit9: TDBEdit;
    Label10: TLabel;
    DBEdit10: TDBEdit;
    Label11: TLabel;
    DBEdit11: TDBEdit;
    DBComboBox1: TDBComboBox;
    DBComboBox2: TDBComboBox;
    BitBtn1: TBitBtn;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmCadFormasPag: TFrmCadFormasPag;

implementation

{$R *.dfm}

procedure TFrmCadFormasPag.FormCreate(Sender: TObject);
begin
  DataSource1.DataSet.Open;
end;

procedure TFrmCadFormasPag.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  DataSource1.DataSet.Open;
  Action := caFree;
end;

procedure TFrmCadFormasPag.BitBtn1Click(Sender: TObject);
begin
  (DataSource1.DataSet as TSqlClientDataSet).ApplyUpdates(0);
end;

end.
